

using System;
using Microsoft.Data.SqlClient;
using Microsoft.Data.Sqlite;
using Oracle.ManagedDataAccess.Client;
using UMC.Data;
using UMC.Data.Sql;


SQLiteDbProvider.Instance = SqliteFactory.Instance;
SqlDbProvider.Instance = SqlClientFactory.Instance;
OracleDbProvider.Instance = OracleClientFactory.Instance;
MySqlDbProvider.Instance = MySql.Data.MySqlClient.MySqlClientFactory.Instance;

UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.InduceLine>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.CheckMessage>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.DataSync>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.DictionaryRegister>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.Line>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.NotifylMessage>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.Shape>();
UMC.WorkFlow.DesignSubassemblyActivity.Register<UMC.WorkFlow.Subassembly.TaskShape>();

UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Form.WorkFlow());
UMC.Web.WebClient.Register(() => new UMC.Web.Activities.SystemSetupActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowCheckControlActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowCommandActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowFlowActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowFormActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowFormControlActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowKeyValueActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowLogActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowMappSelectActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowStaffActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.WorkFlowSubscribeActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignButtonActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignOpenActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignPublishActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignSettingActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignShapeActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.DesignSubassemblyActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Subassembly.WorkFlowSelectActivity());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Subassembly.HttpSettingDesign());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Subassembly.IdentitySettingDesign());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Subassembly.SqlSettingDesign());
UMC.Web.WebClient.Register(() => new UMC.WorkFlow.Subassembly.TextSettinggDesign());


UMC.WorkFlow.DataFactory.Instance();
Initializer.Register(Console.Out, new UMC.WorkFlow.Entities.Initializer());
UMC.Web.WebServlet.AppConf.Put("Home", "/Desktop/flow").Put("Open", "max").Put("Mobile", "/UMC/WorkFlow/Work/");//.Put("Open", "max"); ;
UMC.Data.HotCache.LoadFile();

int port = args.Length > 0 ? Utility.IntParse(args[0], 5188) : 5188;
UMC.Host.HttpServier.Start(port, new UMC.Web.WebServlet());
HotCache.Close();


